using Wolfpack.Core;
using Wolfpack.Core.Configuration;
using Wolfpack.Core.Interfaces.Entities;

namespace Wolfpack.Contrib.DashboardAdapter.Periscope.Formatters
{
    public class PeriscopeTemplatePublisherDiscovery : PluginDiscoveryBase<PeriscopeTemplatePublisherConfig, PeriscopeTemplatePublisher>
    {
        protected override PeriscopeTemplatePublisherConfig GetConfiguration()
        {
            return new PeriscopeTemplatePublisherConfig
            {
                Enabled = true,
                FriendlyId = "PeriscopeTemplateFormatter",
                SourceCheckIdToPush = "Notification CheckId to intercept",
                TargetWidgetId = "Id of widget to update"
            };
        }

        protected override void Configure(ConfigurationEntry entry)
        {
            entry.Name = "PeriscopeTemplatePublisher";
            entry.Description = "This intercepts notifications and renders them via a template and the output is pushed to a Periscope dashboard instance.";
            entry.Tags.AddIfMissing(SpecialTags.PUBLISHER, "Dashboard", "Realtime", "Periscope");
        }
    }
}